<html> 
	<head> 
	<title>My List2</title> 
	<meta name="viewport" content="width=device-width, initial-scale=1"> 
	<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
	<script>
		document.addEventListener("deviceready", onDeviceReady, false);
		// Cordova is ready    //  
		function onDeviceReady() {
			var btn_download=document.getElementById("btn_download");
		 	var btn_sync=document.getElementById("btn_sync");
		 	var btn_goto=document.getElementById("btn_goto");
		 	btn_download.addEventListener('click',
		 	function()
			{		
				alert("text download");
				window.cordova.exec(success, failed,"CubeModuleOperator","install", ["com.foss.flightstatus.demo"]);
			});
			
			btn_sync.addEventListener('click',
		 	function()
			{		
				alert("text sync");
				window.cordova.exec(success, failed,"CubeModuleOperator","sync", []);
			});

			btn_goto.addEventListener('click',
		 	function()
			{		
				alert("text gotoUrl");
				window.cordova.exec(success, failed,"CubeModuleOperator","gotoUrl", ["com.foss.flightstatus.demo"]);
			});
		}

    	function success(message){
    		alert("success "+message);//这里的message从插件的函数返回的
    	}
    
    	function failed(message){
    		alert("failed "+message);
    	}

    	var updateProgress =  function(identifier,progress){
    		// alert(identifier + "is downloading  progress = "+progress);
    		var outlined = document.getElementById("outline");
    		outlined.innerHTML=""+progress+"%";
    	}
    	
    	
	</script>
</head> 
<body>
<button id="btn_download">download</button>
<button id="btn_sync">sync</button>
<button id="btn_goto">跳转</button>
<img src="file:///android_asset/www/res/icon/android/icon-chat.png"></img>
<div id="outline">0%</div>
<a href="http://www.baidu.com" > url</a>
<a href="http://www.baidu.com/cube-action:push" > push</a>
<a href="http://www.baidu.com/cube-action:pop" > pop</a>
</body>
</html>